<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of relatoriocontrole
 *
 * @author leojssilva
 */
include_once 'Evento.php';

class relatoriocontrole extends Controle {
    //put your code here
    function promoevento(){
        $model = new Evento();
        
        $result = $model->findAll(array('id', 'nome'));
        
        $this->set('eventos', $result);
    }
    
    function gerapromoevento(){
        if (!empty ($this->data)){
            $model = new Evento();
            
            $result = $model->execute('relatorio_perc_promocoes_evento', array($this->data['evento_id']));
            
            $this->set('result',$result);
        }
    }
}

?>
